This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
I haven't tested it, but I think this is in the ballpark..
Sub click
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim col As NotesViewColumn
Dim formNameIn As String
Dim viewNameIn As string
Dim fieldCount As Integer
Dim msgString As String
Set db = session.CurrentDatabase
formNameIn = LCase(InputBox("Name of form?"))
viewNameIn = LCase(InputBox("Name of view?"))
Set view = db.createview(viewNameIn,"Form="+formNameIn)
ForAll form In db.Forms
If LCase(form.Name) = formNameIn Then
If IsEmpty(form.Fields) Then
MessageBox form.Name & " has no fields"
Else
fieldCount = 0
msgString = ""
ForAll Field In form.Fields
fieldCount = fieldCount + 1
Set col = view.createcolumn(fieldCount,Field,Field)
End ForAll
End If
Exit Sub
End If
End ForAll
MessageBox "The form """ & formNameIn & """ does not exist"
End sub
Feedback response number WEBB9KZNKH created by ~Fritz Oprekonyettu on 06/12/2014